package com.lisen.common.base.util;

import javax.servlet.http.HttpServletRequest;

public class RequestUtil {

	public RequestUtil() {
	}

	public static String getBasePath(HttpServletRequest request) {
		String path = request.getContextPath();
		String basePath = (new StringBuilder(String
				.valueOf(request.getScheme()))).append("://").append(
				request.getServerName()).append(":").append(
				request.getServerPort()).append(path).append("/").toString();
		return basePath;
	}
}
